package com.haoyuchanghong.com;

import com.wiyun.engine.nodes.Director;
import com.wiyun.engine.nodes.Layer;
import com.wiyun.engine.nodes.Scene;
import com.wiyun.engine.transitions.SplitColsTransition;
import com.wiyun.engine.transitions.SplitRowsTransition;
import com.wiyun.engine.transitions.TransitionScene;

public class MyLayer extends Layer {
	protected String checkPrecondition() {
		return Director.getInstance().isExtensionSupported("GL_OES_framebuffer_object")
			? null
			: "Your device doesn't support frame buffer object, this demo will not work";
	}

    protected TransitionScene getBackTransition(Scene scene) {
	    return (TransitionScene)SplitColsTransition.make(1f, scene, 3).autoRelease();
    }

    protected TransitionScene getTransition(Scene scene) {
	    return (TransitionScene)SplitRowsTransition.make(1f, scene, 3).autoRelease();
    }
}
